package frank.zou.study.testng.extending.testng;

import org.testng.TestNG;
import org.testng.TestListenerAdapter;

public class MyTestNGClass extends TestNG {

	public static void main(String[]args) {

		TestNG testng = new TestNG();
		testng.setTestClasses(new Class[] {MyTest.class});
		TestListenerAdapter listener = new TestListenerAdapter();
		testng.addListener(listener);
		testng.run();
		System.out.println("PASSED: " + listener.getPassedTests().size());
		System.out.println("SKIPPED: " + listener.getSkippedTests().size());
		System.out.println("FAILED: " + listener.getFailedTests().size());
		
	}
}
